package com.nickstumpos.android.easyVolume.preset.dto;

import java.io.Serializable;

import com.nickstumpos.android.easyVolume.streams.presentation.types.Screen;
import com.nickstumpos.android.easyVolume.streams.types.Stream;
import com.nickstumpos.android.easyVolume.volume.levels.VibrateLevel;
import com.nickstumpos.android.easyVolume.volume.levels.VolumeLevel;

public class PresetLevelsDto implements Serializable {

	/**
	 * 
	 */
	private static final long	serialVersionUID	= -2742790722788479948L;
	private boolean						set;
	private VibrateLevel			ringerVibe;
	private VibrateLevel			notificationVibe;
	private VolumeLevel				ringer;
	private VolumeLevel				voice;
	private VolumeLevel				system;
	private VolumeLevel				media;
	private VolumeLevel				notification;
	private VolumeLevel				Alarm;
	private boolean						ringerSlave;

	private boolean						voiceSlave;

	private boolean						systemSlave;

	private boolean						mediaSlave;

	private boolean						notificationSlave;

	private boolean						alarmSlave;

	/**
	 * @return the alarm
	 */
	public VolumeLevel getAlarm() {
		return this.Alarm;
	}

	public boolean getIsSlave(Screen screen) {
		boolean ret;
		switch (screen) {
			case MASTER:
				ret = false;
				break;
			case MEDIA:
				ret = this.mediaSlave;
				break;
			case RINGER:
				ret = this.ringerSlave;
				break;
			case SYSTEM:
				ret = this.systemSlave;
				break;
			case ALARM:
				ret = this.alarmSlave;
				break;
			case VOICE:
				ret = this.voiceSlave;
			case NOTIFICATION:
				ret = this.notificationSlave;
				break;
			default:
				ret = false;
		}
		return ret;
	}

	public VolumeLevel getLevel(Stream stream) {
		VolumeLevel ret;
		switch (stream) {
			case MEDIA:
				ret = this.media;
				break;
			case RINGER:
				ret = this.ringer;
				break;
			case SYSTEM:
				ret = this.system;
				break;
			case ALARM:
				ret = this.Alarm;
				break;
			case VOICE:
				ret = this.voice;
			case NOTIFICATION:
				ret = this.notification;
				break;
			default:
				ret = null;
		}
		return ret;
	}

	/**
	 * @return the media
	 */
	public VolumeLevel getMedia() {
		return this.media;
	}

	/**
	 * @return the notification
	 */
	public VolumeLevel getNotification() {
		return this.notification;
	}

	public VibrateLevel getNotificationVibe() {
		return this.notificationVibe;
	}

	/**
	 * @return the ringer
	 */
	public VolumeLevel getRinger() {
		return this.ringer;
	}

	public VibrateLevel getRingerVibe() {
		return this.ringerVibe;
	}

	/**
	 * @return the system
	 */
	public VolumeLevel getSystem() {
		return this.system;
	}

	public VibrateLevel getVibe(Stream stream) {
		VibrateLevel ret;
		switch (stream) {
			case RINGER:
				ret = this.ringerVibe;
				break;
			case NOTIFICATION:
				ret = this.notificationVibe;
				break;
			default:
				ret = null;
		}
		return ret;
	}

	/**
	 * @return the voice
	 */
	public VolumeLevel getVoice() {
		return this.voice;
	}

	/**
	 * @return the alarmSlave
	 */
	public boolean isAlarmSlave() {
		return this.alarmSlave;
	}

	/**
	 * @return the mediaSlave
	 */
	public boolean isMediaSlave() {
		return this.mediaSlave;
	}

	/**
	 * @return the notificationSlave
	 */
	public boolean isNotificationSlave() {
		return this.notificationSlave;
	}

	/**
	 * @return the ringerSlave
	 */
	public boolean isRingerSlave() {
		return this.ringerSlave;
	}

	/**
	 * @return the set
	 */
	public boolean isSet() {
		return this.set;
	}

	/**
	 * @return the systemSlave
	 */
	public boolean isSystemSlave() {
		return this.systemSlave;
	}

	/**
	 * @return the voiceSlave
	 */
	public boolean isVoiceSlave() {
		return this.voiceSlave;
	}

	/**
	 * @param alarm
	 *          the alarm to set
	 */
	public void setAlarm(VolumeLevel alarm) {
		this.Alarm = alarm;
	}

	/**
	 * @param alarmSlave
	 *          the alarmSlave to set
	 */
	public void setAlarmSlave(boolean alarmSlave) {
		this.alarmSlave = alarmSlave;
	}

	public void setIsSlave(Screen screen, boolean slave) {

		switch (screen) {
			case MASTER:
				break;
			case MEDIA:
				this.mediaSlave = slave;
				break;
			case RINGER:
				this.ringerSlave = slave;
				break;
			case SYSTEM:
				this.systemSlave = slave;
				break;
			case ALARM:
				this.alarmSlave = slave;
				break;
			case VOICE:
				this.voiceSlave = slave;
				break;
			case NOTIFICATION:
				this.notificationSlave = slave;
				break;
		}
	}

	public void setLevel(Stream stream, VolumeLevel level) {

		switch (stream) {
			case MEDIA:
				this.media = level;
				break;
			case RINGER:
				this.ringer = level;
				break;
			case SYSTEM:
				this.system = level;
				break;
			case ALARM:
				this.Alarm = level;
				break;
			case VOICE:
				this.voice = level;
			case NOTIFICATION:
				this.notification = level;
				break;
			default:
		}
	}

	/**
	 * @param media
	 *          the media to set
	 */
	public void setMedia(VolumeLevel media) {
		this.media = media;
	}

	/**
	 * @param mediaSlave
	 *          the mediaSlave to set
	 */
	public void setMediaSlave(boolean mediaSlave) {
		this.mediaSlave = mediaSlave;
	}

	/**
	 * @param notification
	 *          the notification to set
	 */
	public void setNotification(VolumeLevel notification) {
		this.notification = notification;
	}

	/**
	 * @param notificationSlave
	 *          the notificationSlave to set
	 */
	public void setNotificationSlave(boolean notificationSlave) {
		this.notificationSlave = notificationSlave;
	}

	public void setNotificationVibe(VibrateLevel notificationVibe) {
		this.notificationVibe = notificationVibe;
	}

	/**
	 * @param ringer
	 *          the ringer to set
	 */
	public void setRinger(VolumeLevel ringer) {
		this.ringer = ringer;
	}

	/**
	 * @param ringerSlave
	 *          the ringerSlave to set
	 */
	public void setRingerSlave(boolean ringerSlave) {
		this.ringerSlave = ringerSlave;
	}

	public void setRingerVibe(VibrateLevel ringerVibe) {
		this.ringerVibe = ringerVibe;
	}

	/**
	 * @param set
	 *          the set to set
	 */
	public void setSet(boolean set) {
		this.set = set;
	}

	/**
	 * @param system
	 *          the system to set
	 */
	public void setSystem(VolumeLevel system) {
		this.system = system;
	}

	/**
	 * @param systemSlave
	 *          the systemSlave to set
	 */
	public void setSystemSlave(boolean systemSlave) {
		this.systemSlave = systemSlave;
	}

	public void setVibe(Stream stream, VibrateLevel vibe) {
		switch (stream) {
			case RINGER:
				this.ringerVibe = vibe;
				break;
			case NOTIFICATION:
				this.notificationVibe = vibe;
				break;
		}
	}

	/**
	 * @param voice
	 *          the voice to set
	 */
	public void setVoice(VolumeLevel voice) {
		this.voice = voice;
	}

	/**
	 * @param voiceSlave
	 *          the voiceSlave to set
	 */
	public void setVoiceSlave(boolean voiceSlave) {
		this.voiceSlave = voiceSlave;
	}
}
